<?php
$bmsId = get_post_meta($post->ID, 'siteId', true);
$tableId = "bs_crop_calendar";
$description = $wpdb->get_row("SELECT * FROM bs_descriptions WHERE bms_id='" . $bmsId . "' AND table_id='" . $tableId . "'");
$urlJson = get_bloginfo('template_url') . "/ccafs-sites/json.php?table=" . $tableId . "&bmsid=" . $bmsId;
?>
<div id="url-site" style="visibility: hidden;"><?php echo $urlJson ?></div>
<script type="text/javascript" src="https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization',
       'version':'1','packages':['timeline']}]}"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="<?php echo get_bloginfo('template_url'); ?>/ccafs-sites/quick-facts/js/crop-calendar-json.js"></script>


<h4>Crop Calendar</h4>
<div id="container-description" style="float: right;width: 94%;">
   <?php echo $description->description ?>
</div>
<div id="container-chart" style="float: right;width: 99%; height: 250px; margin: 0 auto"></div>
